package test;

/**
 * Created by cwl on 2017/8/4.
 */
public class Throws {
    public static String test1() {
        try {
            int i = 0;
            int x = 2 / i;
            throw new NullPointerException("空指针异常！");
        } catch (NullPointerException e) {
            e.printStackTrace();
        }
        return "";
    }

    public static void main(String[] args) {
        test1();
    }

}
